<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib  prefix="s"  uri="/struts-tags"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
	<div id="p" class="easyui-panel" style="800px;height:50px;padding:10px;"
				data-options="title:'客户信息',
						collapsible:false,minimizable:false,maximizable:false,closable:false">
		<p>订单编号：${contno}&nbsp;&nbsp;客户：${customerName}</p>
	</div>
	
    <!-- <table id="grid_detail"></table> -->
    <table id="grid_detail" class="easyui-datagrid"  style="width:700px;height:350px"
			data-options="url:'contmaster_ajaxDetail.do?contno=${contno}'">
		<thead>
			<tr>
				<th data-options="field:'medname',width:150">商品名称</th>
				<th data-options="field:'factname',width:150">厂家</th>
				<th data-options="field:'price',width:80">单价</th>
				<th data-options="field:'qtycont',width:50">数量</th>
				<th data-options="field:'summoney',width:50">总价</th>
			</tr>
		</thead>
	</table>



<script type="text/javascript">
	$(function(){
		$('#grid_detail').datagrid({
			fitColumns:true,
			nowrap:false,
			rownumbers:true,
			showFooter:true,
		    title:'订单明细',
		    toolbar:[{
					id:'btnsave',
					text:'新增',
					iconCls:'icon-add',
					handler:function(){
						$('#btnsave').linkbutton('disable');
						alert('save')
					}
				},{
					id:'btndel',
					text:'删除',
					iconCls:'icon-remove',
					handler:function(){
						$('#btnsave').linkbutton('disable');
						alert('save')
					}
				},{
					id:'btnreload',
					text:'刷新',
					iconCls:'icon-reload',
					handler:function(){
						$("#grid_detail").datagrid("reload");
					}
				}],
		  
		    url:'contmaster_ajaxDetail.do?contno=${contno}',
		   
		    onDblClickRow: function(rowIndex,rowData){
    			//alert(rowData['contno']);
    			//双击时，显示订单明细
    			//shwoDetail(rowData['contno']);
			},
		    pagination:false
		});
	
	});
	
</script>
